#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;

struct ListNode
{
	int val;
	ListNode* next;

	ListNode(int x)
		: val(x)
		,next(nullptr)
	{}
};
void func()
{
	int n = 1;
	while (1)
	{
		void* p1 = new char[1024 * 1024];
		cout << p1 << "->" << n << endl;
		++n;
	}
}
int main()
{
	ListNode* n1 = new ListNode(1);
	ListNode* n2 = new ListNode(1);
	ListNode* n3 = new ListNode(1);
	ListNode* n4 = new ListNode(1);
	n1->next = n2;
	n2->next = n3;
	n3->next = n4;

	try
	{
		func();
	}
	catch (const exception& e)
	{
		cout << e.what() << endl;
	}
	return 0;
}